<form id="form" action="<?=$_SERVER[ 'PHP_SELF' ]?>" method="post">
	<div style="font-size:12px; width:98%" id="tabs">
		<ul>
			<li><a href="#tabs-1">New</a></li>
			<li><a href="#tabs-2">Edited</a></li>
			<li><a href="#tabs-3">Registered</a></li>
		</ul>
		<div id="tabs-1">
			<table width="100%">
				<tr>
					<td>							
						<?php 
							$this->load->view( $grid.'-new' );
						?>
					</td>
				</tr>
			</table>
		</div>
		<div id="tabs-2">
			<table width="100%">
				<tr>
					<td>
					<?php 
						$this->load->view( $grid.'-edit' );
					?>
					</td>
				</tr>
			</table>
		</div>
		<div id="tabs-3">
			<table width="100%">
				<tr>
					<td>
					<?php 
						$this->load->view( $grid.'-registered' );
					?>
					</td>
				</tr>
			</table>
		</div>
</form>

<!--<script src="https://maps.google.com/maps?file=api&amp;v=2&amp;key=AIzaSyC0JhNTyjMpdmUPMDYWIVuE57dUIHZH1SU&sensor=false" type="text/javascript"></script>-->
<script type="text/javascript" src="<?=$api?>"></script>
<script type="text/javascript" src="<?=base_url()?>file/js/map/epoly.js"></script>
<script>
$(function() {
	$( "#tabs" ).tabs();
});
	
function isValid( lat, lng )
{
	var bound = [new GLatLng(-3.798483975036962, 110.654296875),
	new GLatLng(-9.947208977327021, 110.0830078125),new GLatLng(-8.42890409287538, 116.3671875),new GLatLng(-3.6669277409287107, 117.2900390625),];

	polygon = new GPolygon(bound,5, 1,0.2);
	
	//Contoh jika termasuk dalam polygon
	if(polygon.Contains(new GLatLng(lat, lng)))
		return 1;
	else 
		return 0;
}

</script>